<?php
require_once("../../cofd/common.php");
$userid = $_GET['userid'];
$sql = "SELECT * FROM opinion WHERE (forer='$userid' OR forer = '0') ORDER BY time DESC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $data[]=$row;
    }
}
echo json_encode($data,JSON_UNESCAPED_UNICODE);
$conn ->close();